0% found this document useful (0 votes)
18 views24 pages

Digital Control System Design Project

This document presents a final project on digital control systems by Jhonatan Florez Obando, detailing the analysis and design of controllers using tools like MATLAB and Labview. The project includes objectives such as designing a digital PID controller, analyzing system responses, and calculating error constants. It encompasses theoretical and practical exercises aimed at enhancing understanding of digital control techniques and their applications in real-life systems.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views24 pages

Digital Control System Design Project

This document presents a final project on digital control systems by Jhonatan Florez Obando, detailing the analysis and design of controllers using tools like MATLAB and Labview. The project includes objectives such as designing a digital PID controller, analyzing system responses, and calculating error constants. It encompasses theoretical and practical exercises aimed at enhancing understanding of digital control techniques and their applications in real-life systems.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SCHOOL OF BASIC SCIENCES, TECHNOLOGIES, AND ENGINEERING

DIGITAL CONTROL

FINAL PROJECT

JHONATAN FLOREZ OBANDO


CC. 1098628702

PRESENTED TO THE TUTOR


Diego Fernando Sendoya Losada

NATIONAL OPEN AND DISTANCE UNIVERSITY (UNAD)


ENVIRONMENTAL ENGINEERING
CEAD BUCARAMANGA
2014
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

INTRODUCTION

The analysis and design of such control systems make it necessary to


knowledge of tools such as the Z Transform, the transform of
Fourier Sampling and Stability the Digital Design Techniques based on the
frequency Techniques of digital design and Analysis in the state space. More
even if we add to this the great capability of analysis programs such as
Matlab, then through its study and proper use we can simulate
any type of system that is applicable to real life. The study and
investigation of digital control systems, based on developing
controllers, compensators and digital regulators within a system,
where to check the transient response of a system with
the purpose of reducing error through modeling processes
mathematician, using modeling tools such as MATLAB and SCILAB.
They have allowed students to graphically check the answers.
obtained mathematically. Thus, the purpose of this work is the
to make known through analytical operations and graphic checks,
the topics related to digital design techniques based on the
frequency.
This work is based on the knowledge acquired during the
development of the course Digital Control, Digital Controllers, within the
controllers we find a lead compensator can increase the
stability or the response speed of a system; a compensator in
Delay can reduce (but not eliminate) the steady-state error.
This work consists of a series of developed exercises.
in a practical and theoretical way in which we use the tool of
Labview and Matlab software for the purpose of graphing, simulating, and verifying the

results in an analytical and investigative manner.


Analysis and calculations will be carried out for each of the proposed exercises.
they will analyze transfer functions of a plant.
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

Generally, the anticipatory, delay, and...


advance/delay are designed for a system in the form of a function of
transfer
The position error constants Kp will also be analyzed, the error in
steady state and the settling time for a function of
transfer of the plant.

OBJECTIVES

Design a digital PID controller for a closed-loop system with


some specific characteristics, such as maximum thrust and time
of establishment according to the parameters of the guide.

Use Labview software to analyze and understand the responses


of systems both to impulse and step inputs.

Calculate the error constant Kp, the steady-state error in the presence of
a unit step input and the settling time for the
transfer function of a discretized plant in closed loop.

Apply the knowledge acquired during the Digital Control course


and analyze the different closed-loop systems.
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

DEVELOPMENT
Exercise 1: Assume that the transfer function of the plant is:

(a) Calculate the position error constant Kp, the steady-state error
stationary in response to a unit step input and the settling time
for the transfer function of the discretized plant without controller in
closed loop.
( )=Controlador
=Retenedor de orden cero
Plant
Entry
Exit

( )= ( ) ( ) ∗( ) ( )
( )= ( )− ( ) ( )
Now replacing (1) in (2)
E(s) = R(s) - Gp(s)Zoh(s)E*(s)
[E(s)=R(s)−Gp(s)Zoh(s)E∗(s)]∗
E*(s)=R*(s)−[Gp(s)Zoh(s)]*E*(s)
E*(s) + [Gp(s)Zoh(s)]*E*(s) = R*(s)
E*(s)[1+[Gp(s)Zoh(s)]*]=R*(s)
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL
ESCUELA DE CIENCIAS BÁSICAS TECNOLOGÍAS E INGENIERÍAS
DIGITAL CONTROL

OVERBOOST
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL
SCHOOL OF BASIC SCIENCES, TECHNOLOGIES, AND ENGINEERING
DIGITAL CONTROL
SCHOOL OF BASIC SCIENCES, TECHNOLOGIES, AND ENGINEERING
DIGITAL CONTROL

EXERCISE 2
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

Suppose that the transfer function of the plant is:


1
G p ( s )=
s (s +1)
(a) Calculate the velocity error constant kv, the steady-state error
stationary in front of a unit step input for the function of
transfer of the discretized plant without controller in closed loop; and the
phase margin for the transfer function of the discretized plant without
open loop controller.
1
k v = lim ( z−1 ) HG ( z )
T z→1

[ ]
( )
1
s ( s +1 )
(
HG ( z=) 1−z
−1
z)
s

¿ ( 1−z−1 ) z
[ 1
+
1
s s +1s
2

1
]
−1 0.2z z z
HG ( z
) =(1−z )( ( 2
+
z−1 ) z−e−0.2

z−1
)

0.0187308 ( z +0.935525 )
¿
( z−1)(z−0.818731)

( )
1 0.0187308 ( z +0.935525 )
k v = limz−1( )
T z→1 ( z−1 ) ( z−0.818731 )
k v =0.04
Now the procedure is carried out to find the transfer function.
in closed loop and the position error in order to find the error in state
stationary in front of a step input.

( )
0.0187308 ( z +0.935525 )
( z−1 ) ( z−0.818731 )
k p =lim =1

(
0.0187308z+( 0.935525 )
)
z→1
1+
( z−1z−0.818731
)( )
1
e p= =0.5
1+ k p
Now the phase margin is given:
0.0187308 ( z +0.935525 )
HG ( z )=
( z−1 ) ( z−0.818731 )
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

1+0.5Tw
z=
1−0.5Tw
1+0.5 ( 0.2 ) w
z=
1−0.5 ( 0.2 ) w
( 1+ 0.1w )
z=
1−0.1w

HG (w=)
0.0187308
( ( 1+ 0.1w )
1−0.1w
+ 0.935525 )
( (1−0.1w
1+ 0.1w )
−1 1−0.1w −0.818731 )
)( (1+0.1w )

0.0187308 ( 1+0.1w+0.935525−0.0935525w )
HG ( w )=
(1+ 0.1w−1+0.1w ) ( 1+0.1w−0.818731+0.818731w )
0.1813+0.1818w
0.2w(¿)
¿
0.0187308 ( 1,935525+0.065525w )
HG ( w )=
¿
0.00121w+0.03625
HG ( w )=
0.0363w2 +0.0362w

(b) Design a lead-lag digital compensator so that the system in


closed loop has a phase margin of 50º and the error constant of
speed is kv = 2. Assume that the sampling time is Ts = 0.2
seconds.
Now we proceed to find the transfer function of the plant.

G ( z )= ( 1−z−1 ) z
[ 2
k
s (s+1 ) ]
G ( z )= ( 1−z ) k (
−1
(
0.018273+0.01752z
( 1−z 1−0.81871−z
( −1 2
z ) −1−1

)
) −1
)
k ( 0.01873z+0.01752 )
G ( z )=
(z−1)(z−0.81871)
We perform a bilinear transformation.
1+0.5Tw1+ 0.1w
z= =
1−0.5Tw1−0.1w
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

1+0.1w
0.01873 +0.01752
1−0.1w
G ( w)=k
(
1+ 0.1w
1−0.1w
−1
1+0.1w
1−0.1w )(
−0.81871 )
k(−0.000332653w2−0.096332w+0.996585)
G ( w )=
w2 +0.996805w
With Kv=2 we assume a transfer function for the digital controller.

1+tw
G d ( w )=
1−αw

1+tw k(−0.000332653w2−0.096332w+0.996585)
k v =lim
w→0 ( 1−αw
( ) w2 +0.996805w
)=2

2
k= =2
0.999779
Now we proceed to design a controller that has an angle of 50° without
affect the constant k.
Thus 50-31.6=18.4, a margin between 8 and 12 degrees is recommended considering
the shift of the gain at the crossover frequency will be assumed to be 28°
maximum phase advance angle. To calculate the attenuation factor.
1−α
sinϕm=
1+α
We replace it with the angle
1−α
sen28=
1+α
( 1+α ) sen28=1−α
a=0.361
We find the point where the magnitude is not balanced.
we replace by w=jv in G(w).
1
−20 log =−4.425
√ 0.361

(√ ( ) √ ( ) )
2 2
2 v v
1+ 1+
300 10
vertG ( jv )=
v ❑√ 1+ v 2
The frequency is equal to 1.7
The crossing frequency is given by:
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

1
v c= =1.7
√ ατ
τ =0.9790ατ=0.3534

The compensator would be as follows:

1+τw1+0.9790w
G d ( w )= =
1−αw1+0.3534w

( ( −0.000332653w−0.096332w+0.996585
)(
2
1+0.9790w
)
)
G D ( w ) G ( w )= 2
w + 0.996805w 1+0.3534w
We convert the transfer function of the compensator to z terms by
bilinear transformation medium where T=0.2:
z−1
w=10
z +1

G ( w )=
d
( z+1 )
z −1
1+0.9790 10

1+0.3534 (10
z+ 1 )
z−1

2.3798z−1.93869
G D ( z )=
z−0.558888
In MatLab we have:
SCHOOL OF BASIC SCIENCES, TECHNOLOGIES, AND ENGINEERING
DIGITAL CONTROL

2. PRACTICAL ACTIVITY
ACTIVITY 1
First, we must find the response of the plant in open loop:
Open loop plant response
p1=-1
p2=-2
k=10
Gps=zpk([],[p1 p2],k)
step(Gps);
SCHOOL OF BASIC SCIENCES, TECHNOLOGIES, AND ENGINEERING
DIGITAL CONTROL

CLOSED LOOP
Glcsc=tf(feedback(Gps,1))
[numsc, densc] = tfdata(Glcsc, 'v');
Wn=sqrt(densc(3))
zeta=(densc(2))/(2*Wn)
step(Glcsc,5);

DESIGN CONDITIONS
ts=1.9;
SI=19;
zita=-(log(SI/100))/(sqrt(pi^2+(log(SI/100))^2))
wn=4/(zita*ts)
name
0.4673
wn =
4.5047
Gcs=zpk([p1 p2],[0 -2*zita*wn],wn^2/k)

Gcs =

2.0293 (s+1) (s+2)


------------------
SCHOOL OF BASIC SCIENCES, TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

s (s+4.211)

Continuous-time zero/pole/gain model.


Glccc=minreral(feedback(Gcs*Gps,1))

Glccc =

20.293
----------------------
(s^2 + 4.211s + 20.29)

Continuous-time zero/pole/gain model.


step(Glccc,3)

Test
T=0.1;
Gz = zpk(c2d(Gps, T, 'zoh'))

Gz =

0.04528 (z+0.9048)
---------------------
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

(z-0.9048) (z-0.8187)

Sample time: 0.1 seconds


Discrete-time zero/pole/gain model.
Gcz=zpk(c2d(Gcs,T,'tustin'))
Gcz =

1.9362 (z-0.9048) (z-0.8182)


----------------------------
(z-1) (z-0.6522)

Sample time: 0.1 seconds


Discrete-time zero/pole/gain model.
Glcz = minreal(feedback(Gcz * Gz, 1))

Glcz =

0.087669 (z+0.9048) (z-0.9048) (z-0.8182)


--------------------------------------------
(z-0.818) (z-0.9047) (z^2 – 1.565z + 0.7321)

Sample time: 0.1 seconds


Discrete-time zero/pole/gain model.
step(Glcz)
SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

Point 2
numDz = [0.01873 0.01752];
denDz = [(1-1) (1-0.81871)];
Kv = 2
sys = Kv*tf(numDz, denDz, 0.2)
margin(sys)
sisotool(sys)

This is the Uncompensated system


SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL

This is the compensated system


SCHOOL OF BASIC SCIENCES TECHNOLOGIES AND ENGINEERING
DIGITAL CONTROL
SCHOOL OF BASIC SCIENCES, TECHNOLOGIES, AND ENGINEERING
DIGITAL CONTROL

Common questions

Powered by AI

Error constants such as the position error constant (Kp) and velocity error constant (Kv) serve as key indicators of a digital control system's performance in tracking reference inputs. The position error constant relates to the accuracy with which the system can maintain its output in the presence of a step input, affecting the steady-state error. The velocity error constant reflects the system's ability to follow a ramp input, indicating the capability to maintain accuracy over dynamic changes. Together, these constants help in assessing and optimizing the system for desired performance criteria, ensuring minimal error under different operating scenarios .

Using a lead-lag compensator in digital control systems offers the advantage of precise adjustment of both transient and steady-state performance. A lead component in such a compensator can provide phase lead, improving transient performance by increasing phase margin, thereby enhancing stability. Meanwhile, the lag component can improve steady-state performance by adjusting the gain to achieve the desired error constant. Together, they allow fine-tuning to meet specific design requirements such as a targeted phase margin, ensuring robust system behavior under different operating conditions .

The steady-state error for a closed-loop system with a unit step input is calculated using the position error constant Kp, which can be determined from the system's transfer function. The steady-state error (e_ss) is given by e_ss = 1/(1+Kp) when the system type permits. This calculation is significant because it quantifies the system's ability to track a reference input in the long-term, indicating the accuracy and performance of the control system in eliminating persistent deviations from the desired output .

Understanding transient response in digital control systems is vital for assessing how a system reacts to changes from one state to another before reaching steady-state. It is analyzed by examining characteristics such as rise time, peak time, overshoot, and settling time, which provide insights into the system's speed and stability. Evaluating these characteristics helps in designing controllers like PID or compensators that can modify transient behavior to meet performance objectives, such as minimizing overshoot and achieving faster settling times .

Simulating control systems using software like Labview and Matlab is crucial for verifying and visualizing theoretical models of digital control systems. These tools allow engineers and researchers to perform simulations that provide insights into system behavior under various conditions, enabling the analysis of transient and steady-state responses. Additionally, they facilitate the tuning and optimization of controllers by allowing for easy adjustments and real-time visual feedback, thus ensuring that the designed system meets the specified performance criteria before actual implementation .

The Z Transform is essential in the analysis and design of digital control systems as it allows for the modeling and transformation of discrete-time signals from the time domain to the frequency domain, facilitating the analysis of system dynamics and stability. This transformation enables the simulation and evaluation of control systems using tools like MATLAB, which allows for graphical verification of mathematical calculations and the design of controllers to improve system performance .

A lead compensator can enhance a digital control system by increasing the stability or the speed of response. Specifically, it helps to improve the transient response characteristics by adding phase lead, which can result in reduced overshoot and improved settling time. By modifying the frequency response of the system, a lead compensator can also improve the system's phase margin and gain margin, thus enhancing overall stability .

The phase margin of a discretized plant without a controller in open-loop is calculated by first determining the system's frequency response characteristics, often using a Nyquist or Bode plot. Specifically, the phase margin is the additional phase lag required at the gain crossover frequency (where the gain is 1) to bring the system to the verge of instability. The phase margin is important as it indicates the relative stability of the system; higher phase margins suggest that the system can withstand a greater degree of system changes or model inaccuracies before becoming unstable .

Fourier Sampling relates to stability in digital control design as it involves analyzing the frequency content of signals to ensure that the system behaves appropriately in different frequency ranges. It helps in understanding how various frequency components affect stability and response characteristics of the system. Proper sampling ensures that aliasing is avoided, which can introduce instability. By analyzing the Fourier spectrum, designers can ensure the system's stability by understanding and mitigating the effects of high-frequency components that might destabilize the system .

Designing a digital PID controller with specific requirements involves several steps. First, obtain the mathematical model of the plant and determine its response characteristics. Use this model to establish the controller parameters that achieve the desired performance, such as maximum thrust and settling time. These parameters are tuned iteratively using simulations, for instance in MATLAB, to meet the criteria. The PID controller can be adjusted by modifying the proportional, integral, and derivative gains to balance the trade-offs between speed, stability, and accuracy. Testing in simulation ensures that the designed controller meets all specified requirements before real-world implementation .

You might also like